import {
	defineConfig
} from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
// https://vitejs.dev/config/
export default defineConfig({
	plugins: [
		uni(),
	],
	server: {
		port: 5173,
		proxy: {
			'/x_processplatform_assemble_surface': {
				target: 'http://xstreet.wiiun.com:86',
				changeOrigin: true, // 允许跨域
				ws: true, // 允许websocket代理
				// rewrite: (path) => path.replace(/^\/smartappeam/, ''),
			},
			'/t_certificate_assemble_control': {
				target: 'http://xstreet.wiiun.com:86',
				changeOrigin: true, // 允许跨域
				ws: true, // 允许websocket代理
				// rewrite: (path) => path.replace(/^\/smartappeam/, ''),
			},
			'/x_cms_assemble_control': {
				target: 'http://xstreet.wiiun.com:86',
				changeOrigin: true, // 允许跨域
				ws: true, // 允许websocket代理
				// rewrite: (path) => path.replace(/^\/smartappeam/, ''),
			},
		},
	}
})